home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / assemblers / trashm20.lha / TRASH'M-One.doc < prev    next >
Encoding:
Text File  |  1993-12-13  |  15.1 KB  |  425 lines

  1. *****************************************************************************
  2. * ------------------------------------------------------------------------- *
  3. *****************************************************************************
  4.  
  5.     TRASH'M-One V2.0    Update of ORGINAL ASM-ONE V1.02
  6.  
  7.     Totally ReWritten Code..
  8.  
  9.     Original Source Code supplied by Rune Gram Madsen.
  10.  
  11.     Read This Doc to learn all new functions & modifications to older.
  12.     But the way Functions which have a ---- before their description
  13.     is commands which is not implemented Yet.
  14.     NOTE: Somethings have change since the previous versions
  15.          READ THIS DOC CAREFULLY!!
  16.     
  17.     
  18. *****************************************************************************
  19. * ----- More To Come ------------------------------------------------------ *
  20. *****************************************************************************
  21.  
  22. "Adresss Label Finder" just like "offset label finder" but you don't have to
  23. define section.
  24.  
  25. *****************************************************************************
  26. * ----- TRASH'M-One uses these libs/files --------------------------------- *
  27. *****************************************************************************
  28.  
  29. LIBS:mathtrans.library
  30. LIBS:reqtools.library
  31. ENVARC:TRASH'M-One.Prefs
  32. ENVARC:TRASH'M-ONE.Transfers
  33.  
  34. *****************************************************************************
  35. * ----- Preferences ------------------------------------------------------- *
  36. *****************************************************************************
  37.  
  38. V2.0    GET hold of preferences but Pressing (AMIGA or CTRL)+SHIFT+P ANYWHERE!!
  39. V2.0    Hold Cursor X (Try It, move the cursor around, makes the cursor jump
  40.     back (when moving up or down) to same xpos when ever possible.
  41. V2.0    Save Marks (Save Your 9 Marks In Source File.)
  42.     Note: Your File Will Get 85 Bytes longer.. Now Written in ASCII, so
  43.     it can be read from all editors.
  44. V2.0    DS Clear (if it's off it will not clear the area,Try to make a "extern"
  45.     which load data into a 'ds' then assemble,extern,assemble and look in
  46.     the 'ds' with the monitor..)
  47. V2.0    Assemble %
  48. V2.0    Auto Backup (Every Time You Write Your source, The File on disk with
  49.     the same name Will be renamed to *.Backup )
  50.  
  51. *****************************************************************************
  52. * ----- Modifycations to old Assembler Instructions ----------------------- *
  53. *****************************************************************************
  54.  
  55. V2.0    INCBIN    [NAME[,LENGTH[,SKIP]]]    Include binary file with a length
  56.                     of x and skip the first x's bytes
  57.  
  58. V2.0    IFC,IFNC            New Wildcard example: IFC "\1","Only*"
  59.                     when "*" is met the rest of "\1" is
  60.                     skipped.
  61.  
  62. *****************************************************************************
  63. * ----- New Assembler instructions ---------------------------------------- *
  64. *****************************************************************************
  65.  
  66.     Use of LocalLabels in global area. Example:
  67.  
  68. V2.0    Macro Size Operator \0 Added and now 19 macro input (\1-\19)
  69.     Example:
  70.  
  71.         Addm    macro
  72.             add.\0    \1,        \2
  73.             if    narg<=3
  74.             add.\0    \1,        \3
  75.             endif
  76.             endm
  77.             addm.b    d0,        d1,d2
  78.             addm.w    d0,        d1,d2
  79.             addm.l    d0,        d1,d2
  80.  
  81. V2.0    \.        Get Local Label From Other Global Label Area
  82.             Example:    j    move.l    #q\.loop,d0
  83.                         move.w    #10-1,d7
  84.                     .loop    addq.w    #1,d0
  85.                         dbf    d7,.loop
  86.                         bra.s    q\.Exit
  87.                     q    dc.w    0,0,0,0,0
  88.                     .Exit    move.l    #j\.loop,d0
  89.                         rts
  90.                     .loop    dc.w    0,1,2,3
  91.  
  92. V2.0    |        Is Now the same as ! (OR) compatiblety for commodore
  93.             include files.. to correct old sources search for "|."
  94.             and replace with "\.".
  95.  
  96. V2.0    IncLink        Reads Linker file, Reloc it & Get Symbols.
  97.             Can only handle 1 section pr. file & it's put in
  98.             current section.
  99.             These Commands Can be used to make definitions
  100.             xref   (external reference)  a label you want from
  101.                            the main file
  102.             xdef
  103.             globl
  104.             global
  105.             extern (external definition) a label you will send
  106.                            to main file
  107.             Use the command write-link to save a linkfile..
  108.             this feature saves a lot of assemble time, because
  109.             when the code is assembled and written, and you
  110.             inclink, the assembler just relocs it & fetches 
  111.             the labels! if an error occured in this function
  112.             use "Why" to get undefined label!
  113.  
  114. V2.0    GETR    [REGS]        Get A Register not represented in operand
  115.                 and put it in Userdefined Label. the 
  116.  
  117.             Example:X0    GetR    d0-d1/a0-a7    ;X0=d2
  118.                 X1    GetR    d1/a0-a7/X0    ;X1=d0
  119.  
  120.                 Useful in macros to get some registers
  121.             Example:
  122.                 CULT    macro
  123.                 .D0\@    GetR    \1/\2/\3/\4    
  124.                 .D1\@    GetR    \1/\2/\3/\4/.D0\@
  125.                     sub.l    \1,    .d0\@
  126.                     add.l    \2,    .d0\@
  127.                     sub.l    \3,    .d1\@
  128.                     add.l    \4,    .d1\@
  129.                     endm
  130.  
  131. V2.0    QREPT    [Nr Times]    Just Like Rept, But it just copies memory.
  132.                 a lot faster! Code Will Only Work with Bcc
  133.                 in QRept Area, jmp's & jsr's will not be
  134.                 reloc32. if 0 times is chosen, then it will
  135.                 be repeated 1 time
  136.  
  137. V2.0    ENDQR            End of QRept Area
  138.  
  139. V2.0    REM            Skip source text until "ENDREM"
  140. V2.0    ENDREM            Stops "REM" command, ofcourse "ENDR" still
  141.                 is used for end repeat
  142. V2.0    EREM            Same as "ENDREM"
  143. V2.0    TEXT    [Return Char]    copy source text to code until "ENDT"
  144.                 and puts [Return Char] in end of line, if
  145.                 no [Return Char] is defined it will be 0
  146. V2.0    ENDT            stops "TEXT" command
  147. V2.0    ETEXT            same as "ENDT"
  148.  
  149. V2.0    JUMPERROR [LABEL]    Jumps to user routine when error occures!!
  150.                 if user routine is ended with an illegal,
  151.                 registers is taken from user routine else
  152.                 it is taken from the place where the error
  153.                 occured in the first place!
  154. V2.0    RESCPTR    [LABEL]        Same as JUMPERROR
  155.  
  156. V2.0    IncIFF    Name,[Length]    Reads iff file and convert it to binary
  157.                 data. Bitplanes lie horizontal. (Interleaved)
  158.  
  159. V2.0    INCIFFP    Name,[ColStart]    Reads iff file and grabs the PaletteConvert
  160.                 if [ColStart] isn't set it will dump the
  161.                 palette raw, but if ColStart is set the
  162.                 palette will be useable for copper.
  163.     ColStart UnSet Format:    dc.w Col1,Col2,Col3,Col4....
  164.     ColStart Set Format:     dc.w ColStart,Col1,ColStart+2,Col2....
  165.  
  166. V2.0    AddWatch [Label],[A/S/H/D/B]        ASCII,STRING,HEX,DEC,BINARY
  167.     AddWatch [Label],[P],[Type],[A/S/H/D/B]    POINTER
  168.     AddWatch [Label],[M],[Width]        BITMAP With witdh
  169.                         [Type]    =[DC.L,DC.W,DR.L,DR.W]
  170.                         [WIDTH]    =BITMAP WIDTH
  171.  
  172. V2.0    MEXITC    [nrofENDC]            like "MEXIT" but can end a
  173.                         x number of if's...
  174.  
  175. V2.0    CMEXITC    [nrmacrosback],[nrofENDC]     like "CMEXIT" but can end a
  176.                         x number of if's...
  177.  
  178. V2.0    ENDB    [Ax]                END Basereg
  179.  
  180. -------------------------------------------------------------------------------
  181. -    EXTERN ASSEMBLERS                              -
  182. -------------------------------------------------------------------------------
  183. -    NOW IT IS POSSIBLE TO CREATE YOUR OWN ASSEMBLER, SO IF YOU ARE CODING -
  184. -    A CONSOLE THAT DON'T USES 68000 IT IS POSSIBLE TO WRITE YOUR OWN      -
  185. -    OR IF YOU LIKE TO USE 68040 CODE AND SO ON..                  -
  186. -------------------------------------------------------------------------------
  187.  
  188. V2.0    ASSEMBLER    [ASMLIB]        Load extern assembler and
  189. V2.0    ASM        [ASMLIB]        use it. Example:
  190.                             asm z80
  191.                         q    offset $0
  192.                         j    ld  a,    a
  193.                             ret
  194.                             endoff
  195.                             defasm
  196.                         All assembler files is placed
  197.                         in the directory
  198.                         "libs:trash'm-one/" and
  199.                         their suffix is ".assembler".
  200.                         By the way source examples,
  201.                         docs & includefiles is 
  202.                         available in the directory
  203.                         ":ExternAsm/"
  204.                         NOTE : ALL EXTERN ASSEMBLERS
  205.                         HAS ONLY PRIORITY OVER THE
  206.                         INTERNAL 68000, SO IT IS
  207.                         POSSIBLE TO MAKE A 680X0 ASM.
  208. v2.0    DEFASM                    Return to Default assembler
  209.                         mode. the assembler set in
  210.                         prefs.
  211.  
  212. *****************************************************************************
  213. * ----- New Functions in Command Mode ------------------------------------- *
  214. *****************************************************************************
  215.  
  216. V2.0    =S[Start Char]    SymbolTable        Nothing New, But you can place
  217.                         a start char and it will start
  218.                         displaying it from where you
  219.                         choose. Example: =sh
  220.  
  221. V2.0    WHY        Get Error Info        Writes Your Own Error Text
  222.                         out in Trash'm-one example:
  223.                         j move.l #.ErrorText,WhyPTR
  224.                           rts
  225.                         .ErrorText dc.b 'failed!',0
  226.  
  227.                         : Assemble,start & type WHY
  228.                         and your error text is there!
  229.                         it may only be used for
  230.                         debugging
  231.  
  232.                         IMPORTANT: NEVER LEAVE "WHYPTR"
  233.                         IN THE SOURCE IF IT'S TO BE
  234.                         WRITTEN AS OBJECT..
  235. V2.0    IB        Insert Binary
  236. V2.0    @B        Display Binary
  237. V2.0    BM        Binary Monitor        Like Hexdump,Ascii,DisAsm
  238. V2.0    IS        Insert Sinus
  239. V2.0    CS        Create Sinus        Same As Insert Sinus, but is
  240.                         dumped directly to memory..
  241. V2.0    EL        Extend Labels        Makes Userdefined Extentions
  242.                         on all labels, Useful for
  243.                         demo's with more than one
  244.                         part!!
  245. V2.0    CL        Count Unused Labels    Count the number of unused
  246.                         labels and displays on screen
  247.                         one at the time..
  248.                         you can store them by 
  249.                         redirecting them to a file or
  250.                         printer (command ">").
  251. V2.0    =l        Offset Label Finder    This Command makes it possible
  252.                         to find labels with an offset
  253.                         Trash'm-One will ask you for
  254.                         an Offset & a section.
  255.                         if no section has been made
  256.                         it's 1, if you want to find
  257.                         a definition then use 0 else
  258.                         use the number of section.
  259. V2.0    CD        Create Directory    Creates a user-defined 
  260.                         directory on any storage 
  261.                         devices hooked to the system.
  262. V2.0    WP        Write Project        Saves all swapfiles in one file
  263.                         and remembers all the data such
  264.                         as marks, source pos,filenames
  265.                         & match patterns.. Use Read
  266.                         Source to get written project!
  267. V2.0    ZP        ZAP Project        Like zap source deletes all
  268.                         swapfiles (Swap source).
  269. V2.0    @        Execute            Executes External Program..
  270.                         DirOpus,Dpaint and so on..
  271. V2.0    RC        Read and Convert    Reads & Convert |. to \.
  272.  
  273. V2.0    Y    [NR]    USE TRANSFER LIBRARY [NR] FROM TRANSFER PREFS FILE
  274.                         the name of the file to
  275.                         change the transfer prefs
  276.                         is called 
  277.                         "ENVARC:TRASH'M-ONE.Transfers"
  278. ----    =C [Name or #]    Display Custom Regs    Name example:    =c blt?mod
  279.  
  280. ----    ED    Extern Disassembler..
  281. ----    EDS    Set Extern Disassembler Start Addr.
  282.  
  283. * ----- Modifycations to old Functions in Command Mode -------------------- *
  284.  
  285. V2.0    AD    [StartAddress]            Sets The startaddress for
  286.                         Debugging to [StartAddress].
  287.  
  288. *****************************************************************************
  289. * ----- New Functions in Editor ------------------------------------------- *
  290. *****************************************************************************
  291.  
  292. V2.0    Tabulator is now definable. (Can only be defined at text top.)
  293.     Example:    For Normal Tabulator
  294.  
  295. ;-------T-------T-------T-------T-------T-------T-------T-------T-------T
  296. »·······T-------T·······T-------T·······T-------T-------T-------T
  297. *-------T-------T       T-------T-------T--- ---T-------T-------T-------T
  298.  
  299.     Example:    For AbNormal Tabulator
  300.  
  301. ;---------------T-------T-----------T-----------T
  302.  
  303.     Notice that the length is not the same. After the user defined TAB
  304.     the normal TAB'S gets priority.
  305.     And the start tab character can be three different types and only
  306.     the tabstops "T" is the only character that can not be user defined.
  307.     The Tabulator Routine Has Been Optimized a bit.
  308.  
  309. V2.0    Free Memory indicator    in Bottom of Screen..
  310. V2.0    Assemble Indicator     in the Bottom of Screen..
  311.                  A = Just Asm
  312.                  a = have been started
  313.                  - = Source Been Modified
  314. V2.0    Block indicator     in the Bottom of Screen..
  315.                  B = Grapping Block
  316.                  - = Block not active
  317. V2.0    Clip Buffer Full ind.     in the Bottom of Screen..
  318.                  C = Clip Buffer Full
  319.                  - = Clip Buffer Empty
  320. V2.0    Numlock indicator     in the Bottom of Screen can be changed by
  321.                 pressing numlock button on the key pad.
  322.                  N = Numlock On
  323.                  - = Numlock Off
  324. V2.0    F1-F10            Swap Source inplemented, now you can have 10
  325.                 sources in TRASH'M-One at the same time.
  326.                 this function uses the "t:" dir so if you
  327.                 wan't all the source in ram, then
  328.                 assign the t: dir to ram:
  329. V2.0    Source No. indicator    for Swap Source.
  330. V2.0    Time Indicator        24 hour clock in Bottom of Screen, Useful to
  331.                 measure time.
  332. V2.0    Alt + Up        100 Lines Up Change From CTRL+A Scroll One Up.
  333. V2.0    Alt + Dwn        100 Lines Down Change From CTRL+Z Scroll One 
  334.                 Down.
  335. V2.0    Ctrl + E/e        Search & Exchange..
  336.  
  337. V2.0    Alt+Shift+Up        Scroll One Up        (Smooth Scroll Now)
  338. V2.0    Alt+Shift+Dwn        Scroll One Down
  339.  
  340. V2.0    Ctrl+(1-9)        Jump Mark 1-9
  341. V2.0    Ctrl+Shift+(1-9)    Set  Mark 1-9
  342.  
  343. V2.0    Ctrl+v            Insert Predefined tabulator line. works only
  344.                 on first position in source.
  345.  
  346. V2.0    Ctrl+a            Enter Ascii value
  347.  
  348. V2.0    Alt+Backspace        Delete Word Backwards..» To use with alt+left
  349. V2.0    Alt+Delete        Delete Word Forward....» and alt+right
  350.                 Useful when you want to delete arguments from
  351.                 a dc.b list..
  352.                 TRY ON NEXT LINE to 2*alt+right & 1*alt+delete
  353.                      dc.l    000,100,200,300,400,500
  354. V2.0    Ctrl+;            Comment Block
  355. V2.0    Ctrl+:            UnComment Block
  356.  
  357. *****************************************************************************
  358. * ----- New Functions in Monitor ------------------------------------------ *
  359. *****************************************************************************
  360.  
  361. V2.0    Time, First & End Indicator + Size in the bottom of screen.
  362. V2.0    Ctrl + g        Grab Adress
  363. V2.0    Ctrl + f        Set First Address For BlockSave & Search
  364. V2.0    Ctrl + e        Set End Address For BlockSave & Search
  365. V2.0    Ctrl + w        Write Binary Block From "First" To "End"
  366. V2.0    Ctrl + (S|s)        Search From "First" to "End"
  367. ----    Ctrl + t        Set Base, then when you quickjump the base
  368.                 will be added to the address, but only if
  369.                 it's not a Bcc command.
  370. ----    Ctrl + T        ReSet Base.
  371.  
  372. *****************************************************************************
  373. * ----- New Functions in Debugger ----------------------------------------- *
  374. *****************************************************************************
  375.  
  376. V2.0    Ctrl + e        Extern (Loads Extern data files)
  377.  
  378. V2.0    Bitmap in AddWatch has been added.
  379.  
  380. *****************************************************************************
  381. * ----- BUG REPORT And Changes -------------------------------------------- *
  382. *****************************************************************************
  383.  
  384. V2.0    ENDOFF implemented!
  385.  
  386. V2.0    CNOP did only align to logic number like 1,2,4,8 and so. now it works!
  387.  
  388. V2.0    BUG FIXED when using REPT in macros, Stack error!!!
  389.     and when it repeated with times<1 it CRASHED now it just repeats it
  390.     one time if you tries such an action.
  391.  
  392. V2.0    Bug FIXED in Watch(Debugger), if a watch was a pointer and the watch
  393.     address was an odd address, it CRASHED..
  394.  
  395. V2.0    BUG FIXED in Debugger, Watches are kept as long no changes have been
  396.     made in the source, but are erased if the addwatch command is in the
  397.     source.
  398.  
  399. V2.0    The TRASH'M-One Stack is now read from CLI or Workbench!
  400.     Use Higher Stack if there is a problem with writing object, showing
  401.     symbolstable or using offset label finder.
  402.  
  403. *****************************************************************************
  404. * ----- Know Errors But Not Fixed ----------------------------------------- *
  405. *****************************************************************************
  406.  
  407.     In command line:
  408.  
  409.     WL    write link        Can only handle one section
  410.                     Error in linkfile when using more
  411.                     than one section...
  412.  
  413. *****************************************************************************
  414. * ----- Last Message ------------------------------------------------------ *
  415. *****************************************************************************
  416.  
  417.     Note :    I take no responsibity for any fault the program or your
  418.         hardware creations make.
  419.  
  420.  
  421.  
  422.     Good Luck with Trash'm-One V2.0
  423.  
  424.     Deftronic of Crionics.
  425.